package search;

import java.io.File;

import files.Files;

public class Search {
	
	public static void searchDirectory(String path) {
		File f;
		Files files = new Files();
		try {
			f = new File(path);
		
			if (f.getParent() != null) {
				System.out.println("-> move on next");
				if (f.isDirectory()) {
					System.out.print(f.getPath() + " is Directory");
					files.createFiles(5,f.getName());
				}
				else {
					System.out.print(f.getPath() + " is NOT Directory");
					files.createFiles(5,f.getParent());
				}
			}

		} catch (Exception e) {
			// if any error occurs
			e.printStackTrace();
		}

	}

	public static void searchInFiles(File f)
	{
	
		/*
		 * Get the file
		 * Search for space or enter
		 * From Start of new line to first space/enter
		 * get word and add this to the statistic file
		 * Then skip to the menu for:
		 * - listing words having most count of appear
		 */
		
		
		
	}
}
